<div class="card mb-3">
  <div class="card-header"><span style="float: right;"><a href="/anime/<%= acId %>/ep">添加</a></span>剧集</div>
  <div class="card-body">
    <% list.forEach(function (ep) { %>
    <div class="media text-muted pt-3">
      <a href="/user/<%= ep.author._id %>"><img class="mr-2 rounded" src="/img/<%= ep.author.avatar %>" alt="<%= ep.author.name %>" data-holder-rendered="true" style="width: 32px; height: 32px;"></a>
      <div class="media-body pb-3 mb-0 small lh-125">
        <div class="d-flex justify-content-between align-items-center w-100">
          <strong class="text-gray-dark"><%= user.name %> | <%= ({m: '男', f: '女', x: '保密'})[user.gender] %></strong>
        </div>
        <p><%= ep.created_at %></p>
        <p><a href="/ep/<%= ep._id %>"><%- ep.title %></a></p>
        <!-- <img src="<%- ep.epPic %>" alt="<%- ep.title %>" /><br /> -->
        <!-- <%- ep.url %><br />
        <%- ep.tags %><br /> -->
        <div class="text"><%- ep.content %></div>
        <span class="d-block"><%= user.bio %></span>
      </div>
      <% if (user && ep.author._id && user._id.toString() === ep.author._id.toString()) { %>
      <div class="btn-group">
        <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          操作
        </button>
        <div class="dropdown-menu">
          <a class="dropdown-item" href="/ep/<%= ep._id %>/edit">编辑</a>
          <a class="dropdown-item" href="/ep/<%= ep._id %>/remove">删除</a>
        </div>
      </div>
      <% } %>
    </div>
    <% }) %>
  </div>
</div>
